package com.lqq.springcloud;

import java.time.ZonedDateTime;

public class test {
    public static void main(String[] args) {
        ZonedDateTime now = ZonedDateTime.now();//默认时期
        System.out.println(now);

        /*
           用指定时区获取当前时间
           ZonedDateTime zny = ZonedDateTime.now(ZoneId.of("America/New_York"));
           System.out.println(zny);
        */
    }
}
